<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Auth;

class StaticPageController extends Controller
{
    public function home(Request $request)
    {
        $feed_items = [];
        $curr = $request->page ? $request->page : 0;
        if(Auth::check()){
            $data = Auth::user()->feed();
            $count = $data->count();
            $feed_items = $data->paginate(5);
        }
        return view('static_pages/home', compact('feed_items', 'count', 'curr'));
    }

    public function help()
    {
        return view('static_pages.help');
    }

    public function about()
    {
        return view('static_pages.about');
    }
}
